@import '../../style/themes/index.less';

@halfScreen-prefix-cls: ~'@{prefix}-half-screen-dialog';

.@{halfScreen-prefix-cls} {
  &-wrapper {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    line-height: 1.4;
    background-color: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    overflow: hidden;
    // padding: 0 calc(48px + env(safe-area-inset-right)) env(safe-area-inset-bottom)
    //   calc(48px + env(safe-area-inset-left));
    padding-bottom: env(safe-area-inset-bottom);
    user-select: none;
    -webkit-user-select: none;
  }

  &-bd {
    padding: 0 48px;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    overflow-y: auto;
    max-height: 72vh;
  }

  &-hd {
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 40px 48px;

    &_side {
      position: relative;
      left: -16px;
      font-size: 32px;
    }

    &_main {
      text-align: center;
      padding: 0 80px;
      flex: 1;
    }

    &_main + &_side .side-btn {
      right: 0;
    }

    &_title {
      display: block;
      color: rgba(0, 0, 0, 0.9);
      font-weight: 700;
      font-size: 30px;
    }

    &_subtitle {
      display: block;
      color: rgba(0, 0, 0, 0.5);
      font-size: 22px;
      margin: 0;
    }

    .side-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
    }
  }

  &-ft {
    padding: 64px 96px;
    text-align: center;
    display: flex;

    .weui-btn:nth-last-child(n + 2),
    .weui-btn:nth-last-child(n + 2) ~ .weui-btn {
      display: inline-block;
      vertical-align: top;
      margin: 0 16px;
      width: 240px;
      font-size: 32px;
    }
  }
}
